package com.epam.xml.bank;

public class Card {
	private String cardType;
	private String number;
	private static int count=0;
	private int id=count++;
	private String pin;
	
	public Card() {}
	
	public Card(String cardType) {
		this.cardType=cardType;
		this.number="123456789012345"+id;
		this.pin="123"+id;
	}

	public String getCardType() {
		return cardType;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getPin() {
		return pin;
	}

	public void setPin(String pin) {
		this.pin = pin;
	}

	@Override
	public String toString() {
		return "Card [cardType=" + cardType + ", number=" + number + ", id="
				+ id + ", pin=" + pin + "]";
	}
	
}
